<?php

namespace app\common\model;

use think\Model;

class Goods extends Model
{

    protected $autoWriteTimestamp = true;
    public function getIsOnAttr($value)
    {
        $status = [
            1 => '是', 0 => '否'
        ];
        return $status[$value];
    }


    public function getStatusAttr($value, $data){
        return $data['is_on'];
    }
}
